package com.zuo.mall.controller;

import com.zuo.mall.common.api.CommonResult;
import com.zuo.mall.entity.CmsSubject;
import com.zuo.mall.service.CmsSubjectService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("商品专题管理")
@RestController
@RequestMapping("/subject")
public class CmsSubjectController {
    @Autowired
    private CmsSubjectService cmsSubjectService;
    @GetMapping("listAll")
    public CommonResult<List<CmsSubject>> listALl() {
        List<CmsSubject> list = cmsSubjectService.list();
        return CommonResult.success(list);
    }
}
